public class Test {
    public static int max2(int x,int y){
        int max =0;
        if (x>=y){
            max = x;
        }
        else{
            max = y;
        }
        return max;
    }
    public static int max3(int x,int y,int z){
        int max= 0;
        int num =max2(x,y);
        if (num>=z){
            max = num;
        }
        else{
            max = z;
        }
        return max;
    }
    public static void main(String[] args) {
        int x=1;
        int y=2;
        int z=3;
        int num1=max2(x,y);
        System.out.println(num1);
        int num2=max3(x,y,z);
        System.out.println(num2);

    }
}
